#ifndef QSCANNER_H
#define QSCANNER_H

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
 * This file is part of Suneido - The Integrated Application Platform
 * see: http://www.suneido.com for more information.
 * 
 * Copyright (c) 2000 Suneido Software Corp. 
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation - version 2. 
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License in the file COPYING
 * for more details. 
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#include "scanner.h"
#include "gcstring.h"

class QueryScanner : public Scanner
	{
public:
	explicit QueryScanner(char* buf) : Scanner(buf)
		{ }
	int next();
	void insert(const gcstring& s);
protected:
	int keywords(char*);
	};

enum { K_ALTER = 3000, K_AVERAGE, K_BY, K_CHECK,
    K_COUNT, K_CREATE, 
	K_DELETE, K_DROP, K_ENSURE, K_EXTEND, 
    K_INTO, K_INDEX, 
	K_INSERT, K_INTERSECT, K_JOIN, K_KEY, K_LEFTJOIN, K_LOWER, K_MAX, 
	K_MIN, K_DIFFERENCE, K_PROJECT, K_REMOVE, K_RENAME, K_REVERSE, 
	K_SET, K_SORT, K_SUMMARIZE, K_TIMES, K_TO, K_TOTAL, K_UNION, 
	K_UNIQUE, K_UPDATE, K_VIEW, K_WHERE, K_CASCADE, K_SVIEW,
    K_DEACCENT, K_IGNOREEMPTY, K_AUTOINCREMENT };

#endif
